package com.oocl.oopdemo.fiveday;

public class ReverseString {

	public static void main(String[] args) {
		ReverseString rs=new ReverseString();
		System.out.println(rs.reverse("123qwe"));
	}
	
	public String reverse(String s){
		char[] newstr=new char[s.length()];
		int index=0;
		for (int i = s.length()-1; i>=0; i--) {
			newstr[index]=s.charAt(i);
			index++;
		}
		return new String(newstr);
	}
}
